Color

fun Color(red: Float, green: Float, blue: Float, alpha: Float = 1.0f): Color
fun Color(red: Float, green: Float, blue: Float, alpha: Float = 1.0f): Color

Creates a new instance of Color with the given parameters.

Since

8.0.0

Parameters

red

The red channel value in the 0..1 range.

green

The green channel value in the 0..1 range.

blue

The blue channel value in the 0..1 range,

alpha

The opacity channel value in the 0..1 range. Defaults to 1.0 (non-transparent).

Throws

if any of the passed values is out of the 0..1 range.